package com.zsck.zsgy.ui.main.fragment.mine.bean

import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.viewModelScope
import com.zsck.zsgy.base.BaseViewModel
import com.zsck.zsgy.ui.main.ContentConfig
import com.zsck.zsgy.ui.main.bean.MsgNumberBean
import com.zsck.zsgy.ui.main.bean.UserInfoBean
import com.zsck.zsgy.ui.main.fragment.mine.MineRepoo

class MineViewModel : BaseViewModel() {

    private val repo by lazy { MineRepoo(viewModelScope, errorLiveData) }

    val userInfoModel = MutableLiveData<UserInfoBean>()
    val messageModel = MutableLiveData<MsgNumberBean>()
    val mineConfigModel = MutableLiveData<List<ContentConfig>>()


    fun getUserInfo(){
        repo.getUserinfo(userInfoModel)
    }

    fun getMessage(){
        repo.getMessage(messageModel)
    }

    fun getConfigList(){
        repo.getConfigList(mineConfigModel)
    }

}